﻿using System;
using System.Windows.Media;
using System.Windows.Data;

namespace Coevery.PhoneApp.Convert
{
    public class ColorConverter : IValueConverter
    {
        bool isAlternate;
        SolidColorBrush even = new SolidColorBrush(Color.FromArgb(255, 221, 221, 221));
        SolidColorBrush odd = new SolidColorBrush(Color.FromArgb(255, 200, 238, 252));
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            isAlternate = !isAlternate;
            return isAlternate ? even : odd;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
